<!--
 * @Description: 相对定位
 * @Author: charles
 * @Date: 2021-08-16 11:00:12
 * @LastEditors: charles
 * @LastEditTime: 2021-08-16 11:07:45
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>相对定位</title>
  <style>
    body {
      margin: 0;
    }
    .one , .two{
      height: 100px;
    }
    .one {
      width: 500px;
      background-color: lightblue;
      opacity: .6;
      
      position: relative;
      top: 50px;
      left: 50px;
    }
    .two {
      width: 600px;
      background-color: lightcoral;
    }
  </style>
</head>
<body>
  <div class="one"></div>
  <div class="two"></div>
</body>
</html>
